<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>排行榜</title>
    <script src="${pageContext.request.contextPath}/resources/js/jquery-1.10.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/resources/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/bootstrap.min.css">
</head>
<body>
<div>
    <div class="col-lg-4">
        <h3>总榜</h3>
        <c:forEach items="${comicList1}" var="comicVo" varStatus="status">
            <p>${status.index + 1}</p>
            <div class="comicItemList">
                <div class="comicItem">
                    <a href="${pageContext.request.contextPath}/comic/${comicVo.comic.pinyin}" target="_blank">
                        <img class="comicItem" src="http://192.168.2.149:9000/${comicVo.comic.image}">
                    </a>
                </div>
                <div class="exemptComicItem-txt">
                    <a href="${pageContext.request.contextPath}/comic/${comicVo.comic.pinyin}" target="_blank">
                        <p class="twoLines" title="${comicVo.comic.name}">${comicVo.comic.name}</p>
                    </a>
                    <span class="exemptComicItem-txt-span">作者：
                    <a href="${pageContext.request.contextPath}/comics/queryAuth?auth= ${comicVo.comic.auth}" target="_blank">${comicVo.comic.auth}</a>
                </span>
                </div>
            </div>
            <p>评分:
                <c:choose>
                    <c:when test="${comicVo.avgScore == null}">
                        暂无评分
                    </c:when>
                    <c:otherwise>
                        <fmt:formatNumber type="number" value="${comicVo.avgScore}" pattern="#.##"/>
                    </c:otherwise>
                </c:choose>
            </p>
            <br>
        </c:forEach>
        <div class="clear"></div>
    </div>
    <div class="col-lg-4">
        <h3>周榜</h3>
        <c:forEach items="${comicList2}" var="comicVo" varStatus="status">
            <p>${status.index + 1}</p>
            <div class="comicItemList">
                <div class="comicItem">
                    <a href="${pageContext.request.contextPath}/comic/${comicVo.comic.pinyin}" target="_blank">
                        <img class="comicItem" src="http://192.168.2.149:9000/${comicVo.comic.image}">
                    </a>
                </div>
                <div class="exemptComicItem-txt">
                    <a href="${pageContext.request.contextPath}/comic/${comicVo.comic.pinyin}" target="_blank">
                        <p class="twoLines" title="${comicVo.comic.name}">${comicVo.comic.name}</p>
                    </a>
                    <span class="exemptComicItem-txt-span">作者：
                    <a href="${pageContext.request.contextPath}/comics/queryAuth?auth= ${comicVo.comic.auth}" target="_blank">${comicVo.comic.auth}</a>
                    </span>
                </div>
            </div>
            <p>评分:
                <c:choose>
                    <c:when test="${comicVo.avgScore == null}">
                        暂无评分
                    </c:when>
                    <c:otherwise>
                        <fmt:formatNumber type="number" value="${comicVo.avgScore}" pattern="#.##"/>
                    </c:otherwise>
                </c:choose>
            </p>
            <br>
        </c:forEach>
        <div class="clear"></div>
    </div>
    <div class="col-lg-4">
        <h3>日榜</h3>
        <c:forEach items="${comicList3}" var="comicVo" varStatus="status">
            <p>${status.index + 1}</p>
            <div class="comicItemList">
                <div class="comicItem">
                    <a href="${pageContext.request.contextPath}/comic/${comicVo.comic.pinyin}" target="_blank">
                        <img class="comicItem" src="http://192.168.2.149:9000/${comicVo.comic.image}">
                    </a>
                </div>
                <div class="exemptComicItem-txt">
                    <a href="${pageContext.request.contextPath}/comic/${comicVo.comic.pinyin}" target="_blank">
                        <p class="twoLines" title="${comicVo.comic.name}">${comicVo.comic.name}</p>
                    </a>
                    <span class="exemptComicItem-txt-span">作者：
                    <a href="${pageContext.request.contextPath}/comics/queryAuth?auth= ${comicVo.comic.auth}" target="_blank">${comicVo.comic.auth}</a>
                </span>
                </div>
            </div>
            <p>评分:
                <c:choose>
                    <c:when test="${comicVo.avgScore == null}">
                        暂无评分
                    </c:when>
                    <c:otherwise>
                        <fmt:formatNumber type="number" value="${comicVo.avgScore}" pattern="#.##"/>
                    </c:otherwise>
                </c:choose>
            </p>
            <br>
        </c:forEach>
        <div class="clear"></div>
    </div>
</div>
</body>
</html>
